package mobilefeel.dto;

import java.io.Serializable;

/**
 * A ScreenCoordinates instance contains a pointer's screen coordinates in a
 * touch event. 
 */
public class ScreenCoordinates implements Serializable {

	private static final long serialVersionUID = 1L;

	private int pointer;
	private float x;
	private float y;
	
	/**
	 * Default public constructor.
	 */
	public ScreenCoordinates() {}
	
	/**
	 * Public constructor.
	 * 
	 * @param pointer the pointer ID
	 * @param x the X-coordinate
	 * @param y the Y-coordinate
	 */
	public ScreenCoordinates(int pointer, float x, float y) {
		this.pointer = pointer;
		this.x = x;
		this.y = y;
	}

	/**
	 * Returns the pointer's ID.
	 * 
	 * @return an integer containing the pointer's ID
	 */
	public int getPointer() {
		return pointer;
	}

	/**
	 * Sets the pointer's ID.
	 * 
	 * @param pointer an integer containing the pointer's ID
	 */
	public void setPointer(int pointer) {
		this.pointer = pointer;
	}
	
	/**
	 * Returns the pointer's X-coordinate, relative to the view.
	 * 
	 * @return a float value representing the pointer's X-coordinate
	 */
	public float getX() {
		return x;
	}
	
	/**
	 * Sets the pointer's X-coordinate, relative to the view.
	 * 
	 * @param x a float value representing the pointer's X-coordinate
	 */
	public void setX(float x) {
		this.x = x;
	}
	
	/**
	 * Returns the pointer's Y-coordinate, relative to the view.
	 * 
	 * @return a float value representing the pointer's Y-coordinate
	 */
	public float getY() {
		return y;
	}
	
	/**
	 * Sets the pointer's Y-coordinate, relative to the view.
	 * 
	 * @param y a float value representing the pointer's Y-coordinate
	 */
	public void setY(float y) {
		this.y = y;
	}
	
}